import Layout from '@/layout/index.vue'
// import { MessageBox } from 'element-ui'

const asyncRoutes = [
  {
    path: '/myself',
    name: 'Myself',
    component: Layout,
    meta: {
      title: '我的信息',
      icon: 'nav-icon icon-myself',
      resourceId: 'route:/web/myInformation-management/',
    },
    children: [
      {
        path: '/myself/info',
        name: 'MyselfInfo',
        component: () => import('@/views/myself/index.vue'),
        meta: {
          title: '基本信息管理',
          resourceId:
            'route:/web/myInformation-management/basicInformation-management/',
        },
      },
      {
        path: '/myself/revisePas',
        name: 'MyselfRevisePas',
        component: () => import('@/views/myself/revisePas.vue'),
        beforeEnter: (to, from, next) => {
          // MessageBox.alert(
          //   '请修改系统默认密码,修改成功后才可操作系统！',
          //   '提示'
          // )
          next()
        },
        hidden: true,
        meta: {
          title: '修改密码',
          resourceId:
            'route:/web/myInformation-management/basicInformation-management/modifyPassword-management/',
        },
      },
      {
        path: '/myself/wxPay/:id',
        name: 'MyselfWxPay',
        component: () => import('@/views/user/wxPay.vue'),
        hidden: true,
        meta: {
          title: '小微商户进件',
          resourceId:
            'route:/web/myInformation-management/basicInformation-management/micro-merchant-applyment/',
          key: (route) => `${route.params.id}`,
        },
      },
      {
        path: '/myself/alipayPay',
        name: 'MyselfAlipayPay',
        component: () => import('@/views/user/alipayPay.vue'),
        hidden: true,
        meta: {
          title: '支付宝商户进件',
          resourceId: 'route:/web/myself-management/advert/', //todo
        },
      },
      {
        path: '/myself/agentInfoPerfect',
        name: 'MyselfAgentInfoPerfect',
        component: () => import('@/views/myself/consummateMchInfo.vue'),
        hidden: true,
        meta: {
          title: '完善账户资料',
          resourceId:
            'route:/web/myInformation-management/basicInformation-management/', //todo
        },
      },
      {
        path: '/myself/agent-timecard-management',
        name: 'MyselfAgentTimecardManagement',
        component: () => import('@/views/myself/agentTimecardManagement.vue'),
        meta: {
          title: '通用时长卡管理',
          resourceId: 'route:/web/myInformation-management/merchantTimeCard/',
        },
      },
      {
        path: '/myself/agent-timecard-add',
        name: 'MySelfAgentTimecardAdd',
        component: () => import('@/views/myself/agentTimecardAdd.vue'),
        meta: {
          title: '新增通用时长卡',
          resourceId:
            'route:/web/myInformation-management/merchantTimeCard/insert/',
        },
        hidden: true,
      },
      {
        path: '/myself/agent-timecard-add/:id',
        name: 'MySelfAgentTimecardEdit',
        component: () => import('@/views/myself/agentTimecardAdd.vue'),
        meta: {
          title: '编辑通用时长卡',
          resourceId:
            'route:/web/myInformation-management/merchantTimeCard/insert/',
          key: (route) => `${route.params.id}`,
        },
        hidden: true,
      },
      {
        path: '/myself/andEnergy',
        name: 'AndEnergyList',
        component: () => import('@/views/myself/andEnergyList.vue'),
        meta: {
          title: '和能量管理',
          resourceId: 'route:/web/myInformation-management/merchantHycEnergy/',
        },
      },
      {
        path: '/myself/andEnergyAdd',
        name: 'AndEnergyAdd',
        component: () => import('@/views/myself/andEnergyAdd.vue'),
        meta: {
          title: '新增和能量',
          resourceId:
            'route:/web/myInformation-management/merchantHycEnergy/insert/',
        },
        hidden: true,
      },
      {
        path: '/myself/andEnergyEdit/:id',
        name: 'AndEnergyEdit',
        component: () => import('@/views/myself/andEnergyAdd.vue'),
        meta: {
          title: '编辑和能量',
          resourceId:
            'route:/web/myInformation-management/merchantHycEnergy/update/',
          key: (route) => `${route.params.id}`,
        },
        hidden: true,
      },
      {
        path: '/myself/noticeList',
        name: 'noticeList',
        hidden: true,
        component: () => import('@/views/myself/noticeList.vue'),
        meta: {
          title: '消息列表',
          // resourceId: 'route:/web/myInformation-management/', //todo
        },
      },
      {
        path: '/myself/smsSet',
        name: 'smsSet',
        hidden: true,
        component: () => import('@/views/myself/smsSet.vue'),
        meta: {
          title: '短信设置',
          resourceId: 'route:/web/myInformation-management/', //todo
        },
      },
    ],
  },
]
export default asyncRoutes
